<template>
<el-row>
    <el-col :span="24">
        
        <h1>现场挂号</h1>
        <el-row>
            <el-col :offset="1" :span="20">
                <el-button>挂号</el-button><el-button>重置</el-button>
            </el-col>
        </el-row>
        <el-row>
            <el-col :offset="1" :span="20">
                <h2 style="font-size:18px">基本信息</h2>
                <el-form>
                    <el-form-item label="病历号">
                        <el-input v-model="form.caseNumber"/>
                    </el-form-item>
                    <el-form-item label="姓名">
                        <el-input v-model="form.realName"  />
                    </el-form-item>
                    <el-form-item label="年龄">
                        <el-input v-model="form.age"  />
                    </el-form-item>
                    <el-form-item label="身份证号码">
                        <el-input v-model="form.cardNumber"  />
                    </el-form-item>
                    <el-form-item label="性别">
                        <el-select
                            v-model="form.gender"
                            placeholder="性别">
                            <el-option label="男" value="男" />
                            <el-option label="女" value="女" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="家庭住址">
                        <el-input v-model="form.homeAddress"  />
                    </el-form-item>
                    <el-form-item label="出生日期">
                        <el-date-picker
                            v-model="form.birthday"
                            type="date"
                            placeholder="选择日期"
                        />
                    </el-form-item>
                
                <h2  style="font-size:18px">挂号信息</h2>
                
                    <el-form-item label="结算类别">
                        <!-- 现金、银行卡、微信、医保卡、支付宝 -->
                        <el-select
                            v-model="form.registMethod"
                            placeholder="性别">
                            <el-option label="现金" value="现金" />
                            <el-option label="银行卡" value="银行卡" />
                            <el-option label="微信" value="微信" />
                            <el-option label="医保卡" value="医保卡" />
                            <el-option label="支付宝" value="支付宝" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="看诊日期">
                        <el-date-picker
                            v-model="form.visitDate"
                            type="date"
                            placeholder="选择日期"
                        />
                    </el-form-item>
                    <el-form-item label="午别">
                        <el-select
                            v-model="form.noon"
                            placeholder="午别">
                            <el-option label="上午" value="上午" />
                            <el-option label="下午" value="下午" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="挂号科室">
                        <el-input v-model="form.deptmentId"  />
                    </el-form-item>
                    <el-form-item>
                        <el-select
                            v-model="form.registLevelId"
                            placeholder="号别"
                            clearable
                        >
                            <el-option v-for="level in regLevelList" 
                                            :key="level.id" 
                                            label="level.registName" 
                                            value="level.id" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="看诊医生">
                        <el-input v-model="form.employeeId"  />
                    </el-form-item>
                    <el-form-item label="初始号额">
                        <el-input   />
                    </el-form-item>
                    <el-form-item label="已用号额">
                        <el-input  />
                    </el-form-item>
                    <el-form-item label="应收金额">
                        <el-input v-model="form.registMoney"  />
                    </el-form-item>
                    <el-form-item label="收费方式">
                        <el-input v-model="form.registMethod"  />
                    </el-form-item>
                    <el-form-item label="病历本">
                        <el-input v-model="form.isBook"  />
                    </el-form-item>
                </el-form>
            </el-col>
        </el-row>

</el-col>
</el-row>
</template>

<script setup>
import httpRequest from '@/common';
import { ref, getCurrentInstance, onMounted } from 'vue';

 const form = ref({
    caseNumber: '',
    realName: '',
    gender: null,
    cardNumber: '',
    birthday: '',
    age: 0,
    ageType: '年',
    homeAddress: '',
    visitDate: '',
    noon: '上午',
    deptmentId: null,
    employeeId: null,
    registLevelId: null,
    settleCategoryId: null,
    isBook: null,
    registMethod: null,
    visitState: null,
    registMoney: null
 })

 const regLevelList = ref([]);

 const getLevelList = ()=>{
    httpRequest(
        proxy,
        'get',
        '/registelevel/all',
        null,
        (resultBean)=>{
            regLevelList.value = resultBean.data;
        }
    )
 }

 onMounted(()=>{
    getLevelList();
 })

</script>

<style>
</style>